﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using KBManagement.DAL;
namespace KBManagement.BIZ
{
    class CategoryFacade:FacadeBase<Category>
    {

        public override IQueryable Select()
        {
            var categorys = from fc in Library.Utils.CreateInstance().GetDBContext().Categories select fc;
            return categorys;
        }

        public override Category[] SelectEntities()
        {
            var categorys = from fc in Library.Utils.CreateInstance().GetDBContext().Categories select fc;
            return categorys.ToArray();
        }

        public override Category Find(object id)
        {
          return  SelectEntities().First<Category>(x => (object)x.ID == id);
        }

        public override Category[] FindMany(object id)
        {
            throw new NotImplementedException();
        }
    }
}
